struct Student {
    name : String,
    addr : String,
    sex : bool,
    age : u32,
}

impl Student {
    fn getage(&self) -> u32 {
        self.age
    }
    fn setage(&mut self, inage : u32) {
        self.age = inage;
    }
}

fn main() {
    {
        // 对于 Student 这类类型，默认是移动语义（所有权转移）
        let mut tmpsdt = Student {
            name : String::from("lxin"),
            addr : String::from("jinzhou"),
            sex : false,
            age : 33,
        };
        println!("student info:{:p},{},{},{},{}", &tmpsdt, tmpsdt.name, tmpsdt.addr, tmpsdt.sex, tmpsdt.age);
        println!("student age:{}", tmpsdt.getage());
        tmpsdt.setage(35);
        println!("student age:{}", tmpsdt.getage());
    }
}
